Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] 회원가입 API 구현 #23

Merged
merged 4 commits into from
Oct 10, 2023
Merged

[FEATURE] 회원가입 API 구현 #23

merged 4 commits into from
Oct 10, 2023

Conversation

bongsh0112
Copy link
Member

회원가입 API 구현

@bongsh0112 bongsh0112 added the enhancement New feature or request label Oct 10, 2023
Copy link
Member

@donsonioc2010 donsonioc2010 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AuthController.register(String, RegisterRequest)메소드의 token에 대해서만 알려주세오

Comment on lines 35 to 38
@PostMapping("/register/{token}")
public ResponseEntity<AuthResponse> register(@PathVariable String token, @RequestBody @Valid RegisterRequest request) {
return userService.registerUser(request);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

회원가입인것 같은데 token의 역할이 뭔지 궁금합니다.

사용자 가입을 할때는 애초애 아무정보가 없어야 하지않나 생각이 드네요.

Copy link
Member Author

@bongsh0112 bongsh0112 Oct 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수정했습니다요
나중에 소셜로그인쪽 할 때 추가될 수도 있을 것 같습니다
아니면 소셜로그인 회원가입은 따로 빼야겠네요

Comment on lines 27 to 36
User user = userRepository.save(User.builder()
.email(request.getEmail())
.password(request.getPassword())
.nickName(request.getNickName())
.thumbnail(request.getThumbnail())
.build());

AuthResponse res = AuthResponse.builder()
.token(jwtTokenProvider.generateToken(user.getId(), user.getEmail(),user.getNickName(), user.getRole()))
.build();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Copy link
Member

@donsonioc2010 donsonioc2010 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ㅇㅋ

Copy link
Collaborator

@wooni89 wooni89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wooni89 wooni89 merged commit b4925e7 into dev Oct 10, 2023
1 check passed
@wooni89 wooni89 deleted the feat/4-security-login branch October 10, 2023 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants